package com.example.mybatisplus.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.mybatisplus.entity.prower;
import com.example.mybatisplus.entity.userRolePrower;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: lixiao
 * Created Date: 2020/9/22 18:29
 */
@Repository
public interface prowerMapper extends BaseMapper<prower> {
    @Select("select SYS_USER.oid as oid,SYS_PROWER.oid as oid1,SYS_PROWER.oid as oid2 from " +
            "SYS_USER, SYS_ROLE,SYS_PROWER " +
            "where SYS_USER.role = SYS_ROLE.oid and SYS_ROLE.prower_oid=SYS_PROWER.prowerOid")
    public List<userRolePrower> query();
}